/**
 * @file test_inet_ntop.c
 * @author your name (you@domain.com)
 * @brief inet_ntop()函数使用示例
 * @version 0.1
 * @date 2023-07-03
 * 
 * @copyright Copyright (c) 2023
 * 
 */
#include <stdlib.h>
#include <stdio.h>
#include <arpa/inet.h>

int main(int argc, char const *argv[])
{
    struct in_addr addr;
    char buf[20] = { 0 };

    addr.s_addr = 0xde01a8c0;
    inet_ntop(AF_INET, &addr, buf, sizeof(buf));
    printf("ip addr: %s\n", buf);

    exit(0);
}
